package com.tunan.system.att.error;

import java.util.ArrayList;

import com.exception.AbstractMainError;
import com.exception.SubError;

public class AttachmentNotFoundMainError extends AbstractMainError {
	
	private static final long serialVersionUID = 1L;
	
	private static final String CODE = "10";
	private static final String MESSAGE = "找不到文件";
	private static final String SOLUTION = "请联系管理员是否删除了上传文件或所属的文件夹！";
	
	public AttachmentNotFoundMainError(String... parameters) {
		super(CODE, MESSAGE, SOLUTION);
		setSubErrors(parameters);
	}
	
    private void setSubErrors(String... parameters){
    	if(parameters != null && parameters.length > 0){
    		ArrayList<SubError> subErrors = new ArrayList<SubError>();
		    subErrors.add(new SubError(parameters[0],parameters[1]));
    		setSubErrors(subErrors);
    	}
    }
}
